﻿using System.Windows;

namespace Dsl.Ped.Framework.Common
{
    /// <summary>
    /// This is the base class that can be used
    /// for the creation of projections
    /// </summary>
    public class ProjectionBase
    {
        #region Fields

        /// <summary>
        /// Gets or sets the projection model 
        /// </summary>
        public object Model { get; set; }        

        #endregion

        #region Constructors

        /// <summary>
        /// Constructor.
        /// </summary>
        /// <param name="name">Name of the projection</param>
        /// <param name="view">View of the projection</param>
        /// <param name="projectionModel">Model of the projection</param>
        public ProjectionBase(FrameworkElement view,
                              object projectionModel)
        {
            View = view;
            Model = projectionModel;

            View.DataContext = Model;
            
        }

        #endregion        
       
        #region Public members

        /// <summary>
        /// Gets or sets the view of the projection
        /// </summary>
        public FrameworkElement View { get; private set; }

        #endregion
    }
}
